<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table border="1" cellspacing="0" align="center">
    <caption>商品中心</caption>
    <tr>
        <th>商品种类</th>
        <th>过季旧款</th>
        <th>当前热销</th>
        <th>秋季新品</th>
    </tr>
    <tr>
        <th>商品状态</th>
        <th id="down">已下架</th>
        <th class="up"><span>热卖中</span></th>
        <th class="up">等待上架</th>
    </tr>
</table>
</body>
</html>
<script>
    var down1=document.getElementById('down')
    console.log(down1.innerHTML);
    //获取up元素，然后根据up1更改html内容
    var up1=document.getElementsByClassName('up')
    console.log(up1[0].innerHTML);
    up1[1].innerHTML='已上架'
</script>